package com.example.innospace.demos.web.service;

import com.example.innospace.demos.pojo.Request.ProjectUploadRequest;
import com.example.innospace.demos.pojo.dto.ProjectPageQueryDTO;
import com.example.innospace.demos.pojo.entity.Project;
import com.example.innospace.demos.pojo.enums.MessageEnum;
import com.example.innospace.demos.pojo.result.PageResult;
import com.example.innospace.demos.pojo.vo.ProjectVO;
import org.springframework.web.multipart.MultipartFile;

import javax.transaction.Transactional;
import java.io.IOException;
import java.util.List;

public interface ProjectService {



    @Transactional
    MessageEnum saveProject(ProjectUploadRequest projectUploadRequest, List<MultipartFile> files) throws IOException;

    ProjectVO getInfoById(int id);

    PageResult pageQuery(int pageNum, int pageSize, ProjectPageQueryDTO projectPageQueryDTO);

    void deleteByProjectId(Integer projectId);

    void setLevel(String level, int id);

    void setUUID(String projectUUID, int id);

    boolean updateProject(Project project, List<MultipartFile> files);

    boolean updateStudents(List<String> studentIds, String studentId, int id);

    Project getById(int id);

    void updateLevel(Integer id, String level);

    void updateProjectUUID(Integer id, String projectUUID);

    void updateSchoolApprovalStatus(Integer projectId, boolean isPassed);

    void updateCollegeApprovalStatus(Integer projectId, boolean isPassed);

    void updateTeacherFirst(String teacherId, String updaterId, Integer id);

    void updateTeacherSecond(String teacherId, String updaterId, Integer id);



    boolean submitMidtermApplication(Integer projectId, MultipartFile file);

    void submitMidtermExtensionRequest(boolean isProjectExtended, Integer projectId);

    @Transactional
    void updatePhaseType(String phaseType, Integer projectId);
}
